<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateInvestOrgTable extends Migration {

    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        //投资机构信息表
        Schema::create('invest_org', function(Blueprint $table)
        {
            $table->increments('id');                              //投资机构标识
            $table->string('invest_name');                         //投资机构名称
            $table->unsignedInteger('img_logo_id')->nullable();    //投资机构logo
            $table->unsignedInteger('link_web_id')->nullable();    //投资机构链接
            $table->text('invest_desc')->nullable();               //投资机构描述
            $table->string('invest_money')->default(0);            //投资总量
            $table->integer('min_quota')->default(0);             //最小投资额度
            $table->integer('max_quota')->default(0);              //最大投资额度
            $table->string('wechat')->nullable();                  //微信公众号
            $table->string('weibo')->nullable();                   //微博号
            $table->timestamp('begin_date')->nullable();           //成立时间
            $table->unsignedInteger('user_id')->nullable();        //归宿用户
            $table->integer('status')->default(0);                 //投资机构状态
            $table->softDeletes();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('invest_org');
    }

}
